
<template>
  <div class="app-container" id="appss">
    <!-- <table width="100%" class="util-table">
      <tr>
        <th width="41%" colspan="6">政策备注信息</th>
        <th colspan="6" width="59%">
          <table width="100%">
            <tr>
              <th rowspan="2" width="16%">上/下游</th>
              <th colspan="2" width="34%" style="border-width: 0px 1px 1px; border-top-style: initial; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: initial; border-right-color: white; border-bottom-color: white; border-left-color: white; border-image: initial;">交强险</th>
              <th colspan="2" width="34%" style="border-width: 0px 1px 1px; border-top-style: initial; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: initial; border-right-color: white; border-bottom-color: white; border-left-color: white; border-image: initial;">商业险</th>
              <th rowspan="2" width="16%">操作</th>
            </tr>
            <tr >

              <th width="17%">佣金</th>
              <th width="17%" style="border-right: 1px solid white;">奖励</th>
              <th width="17%">佣金</th>
              <th width="17%">奖励</th>
            </tr>
          </table>
        </th>

      </tr>
    </table> -->
    <!-- <table width="100%" class="util-table">
      <tr>
        <td rowspan="2">
          家庭自用6座
        </td>
        <td colspan="5">
          不含车损业务
        </td>
        <td colspan="6">
          <table width="100%">
            <tr>
              ####row_1####
            </tr>
            <tr>
              ####row_2####
            </tr>
            <tr>
              ####row_3####
            </tr>
            <tr>
              ####row_4####
            </tr>
          </table>
        </td>
      </tr>
      <tr >

        <td colspan="5">
          含车损业务
        </td>
        <td colspan="6">
          <table width="100%">
            <tr>
              ####row_5####
            </tr>
            <tr>
              ####row_6####
            </tr>
            <tr>
              ####row_7####
            </tr>
            <tr>
              ####row_8####
            </tr>
          </table>
        </td>
      </tr>
    </table> -->
    <!-- <system :value="value" :getData="getdata"></system> -->
    <table width="100%" class="table-top" border="0">
      <tr>
        <th width="41%" colspan="6">政策备注信息</th>
        <th colspan="6" width="59%">
          <table width="100%" border="0" class="table-two">
            <tr>
              <th rowspan="2" width="16%">上/下游</th>
              <th colspan="2" width="34%" style="border-width: 0px 1px 1px; border-top-style: initial; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: initial; border-right-color: white; border-bottom-color: white; border-left-color: white; border-image: initial;">交强险</th>
              <th colspan="2" width="34%" style="border-width: 0px 1px 1px; border-top-style: initial; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: initial; border-right-color: white; border-bottom-color: white; border-left-color: white; border-image: initial;">商业险</th>
              <th rowspan="2" width="16%">操作</th>
            </tr>
            <tr>

              <th width="17%">佣金</th>
              <th width="17%" style="border-right: 1px solid white;">奖励</th>
              <th width="17%">佣金</th>
              <th width="17%">奖励</th>
            </tr>
          </table>
        </th>

      </tr>
    </table>
    <table width="100%" class="table-one" border="0">

      <tr>
        <td rowspan="3" width="10%">
          家庭自用6座
        </td>
        <td width="10%">
          含车损业务
        </td>
        <td colspan="4" width="21%">
          保费类型1
        </td>
        <td colspan="6" width="59%">
          <table width="100%" border="0" class="table-two">
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','0')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit1'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" @change="yongjin" class="Proportionedit_inp" :class="{'mmerror': jiaoqiang}" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" @change="jiangli" class="Proportionedit_inp" :class="{'mmerror': jiaoqiang}" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" @change="yongjin2" class="Proportionedit_inp" :class="{'mmerror': shangye}" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" @change="jiangli2" class="Proportionedit_inp" :class="{'mmerror': shangye}" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit1')">取消</el-button>
                    <el-button size="mini" @click="subpolicy('refs')">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','brokerageBusinessType返佣类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,0,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets1'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets1')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('delets1','policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','brokerageBusinessType佣金类型')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit2'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit2')">取消</el-button>
                    <el-button size="mini" @click="subpolicy">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets2'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets2')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>

          </table>
        </td>
      </tr>
      <tr>
        <td rowspan="2">不含车损业务</td>
        <td colspan="4" class='l_td'>
          保费类型2
        </td>

        <td colspan="6">
          <table width="100%" border="0" class="table-two">
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','brokerageBusinessType佣金类型')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit3'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit3')">取消</el-button>
                    <el-button size="mini" @click="subpolicy">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets3'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets3')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','brokerageBusinessType佣金类型')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit4'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit4')">取消</el-button>
                    <el-button size="mini" @click="subpolicy">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets4'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets4')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','brokerageBusinessType佣金类型')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit5'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit5')">取消</el-button>
                    <el-button size="mini" @click="subpolicy">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets5'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets5')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>

          </table>
        </td>
      </tr>
      <tr>
        <td colspan="4">
          车辆种类2
        </td>
        <td colspan="6">
          <table width="100%" border="0" class="table-two">
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','brokerageBusinessType佣金类型')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit3'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit3')">取消</el-button>
                    <el-button size="mini" @click="subpolicy">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets3'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets3')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','brokerageBusinessType佣金类型')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit4'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit4')">取消</el-button>
                    <el-button size="mini" @click="subpolicy">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets4'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets4')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>
            <tr>
              <td width="16%" class="m_td">
                上游
              </td>
              <td width="17%" class="m_td">
                10%
              </td>
              <td width="17%" class="m_td">
                20%
              </td>
              <td width="17%" class="m_td">
                30%
              </td>
              <td width="17%" class="m_td">
                40%
              </td>
              <td width="16%" class="m_td">
                <a class="m_a" @click="addlowpolic('962e21be-ca51-4e9a-9306-a5867588db5f','brokerageBusinessType佣金类型','chargeType返佣 ')">添加</a>
                <el-popover placement="top" width="420" :ref="'edit5'">
                  <div class="Proportionedit_top">
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">交强险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div class="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div id="">
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>

                      </div>
                    </div>
                    <div class="Proportionedit_left">
                      <p class="Proportionedit_title">商业险</p>
                      <div class="Proportionedit_name">
                        <p>佣金：</p>
                        <p>奖励：</p>
                      </div>
                      <div class="Proportionedit_name">
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                        <div>
                          <span v-if="additional.chargeType==1">-</span>
                          <el-input v-model="additional.upperRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-"></el-input>
                          <span v-if="additional.brokerageBusinessType==0">%</span>
                          <span v-else>元</span>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="edithide('edit5')">取消</el-button>
                    <el-button size="mini" @click="subpolicy">确定</el-button>
                  </div>
                  <!-- <a slot="reference" @click="gotoEdit('chargeType政策类型','policyId政策id','交强佣金','交强奖励','商业佣金','商业奖励')">编辑22</a> -->
                  <a class="m_a" slot="reference" @click="gotoEdit(1,'2222-22222-33333-2224444','23','24','25','26')">编辑22</a>
                </el-popover>
                <a class="m_a" @click="toDetail('batchId政策批次ID','policyId政策id','status0/1/2/3/4/5状态编辑审核','stream上游1下游2')">详情</a>
                <el-popover :ref="'delets5'" placement="bottom" width="250">
                  <p class="candeletes">确定删除吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="info" @click="deleteCancel('delets5')">取消</el-button>
                    <el-button size="mini" @click="deletepolicy('policyBatchType','policyId','policyItemRatesID如果删除下游政策就传')">确定</el-button>
                  </div>
                  <a class="m_a" @click="deletPolicy" slot="reference">删除</a>
                </el-popover>
              </td>
            </tr>

          </table>
        </td>
      </tr>

    </table>
    <el-dialog title="添加下游政策" :visible.sync="isshow" width="550px" :close-on-click-modal='false'>
      <div class="content">
        <el-form :model="json" :rules="rules" ref="json" label-width="150px">
          <el-form-item label="添加对象类型:" :label-width="formLabelWidth">

            部门
          </el-form-item>
          <el-form-item label="添加对象" :label-width="formLabelWidth" prop="targetId">
            <el-select no-data-text="无部门可选" class="inputs" multiple v-model="json.targetId" size="mini" placeholder="请选择对象">
              <el-option v-for="item in organization" :label="item.organizationName" :value="item.organizationId" :key="item.organizationId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="交强险设置:" :label-width="formLabelWidth">
            <div class="numcontent" :class="indexs==1?'actives':''">
              <span>
                佣金
                <el-input class="numinp" :class="{'mmerror': adjiaoqiang}" v-model="json.lowerBrokerageTraffic" @change="adjiaoqiang1($event,'lowerBrokerageTraffic')" size="mini"></el-input>
                <span> {{json.brokerageBusinessType | isPercentage}}</span>
              </span>

              <span>
                奖励
                <el-input class="numinp" :class="{'mmerror': adjiaoqiang}" v-model="json.lowerRewardTraffic" @change="adjiaoqiang2($event,'lowerRewardTraffic')" size="mini"></el-input>
                <span> {{json.brokerageBusinessType | isPercentage}}</span>
              </span>

            </div>
          </el-form-item>

          <el-form-item label="商业险设置:" :label-width="formLabelWidth">
            <div class="numcontent" :class="indexs_tow==2?'actives_tuo':''">
              <span>
                佣金
                <el-input class="numinp" :class="{'mmerror': adshangye}" v-model="json.lowerBrokerageBusiness" @change="adshangye1($event,'lowerBrokerageBusiness')" size="mini"></el-input>
                <span> {{json.brokerageBusinessType | isPercentage}}</span>
              </span>

              <span>
                奖励
                <el-input class="numinp" :class="{'mmerror': adshangye}" v-model="json.lowerRewardBusiness" @change="adshangye2($event,'lowerRewardBusiness')" size="mini"></el-input>
                <span> {{json.brokerageBusinessType | isPercentage}}</span>
              </span>

            </div>
          </el-form-item>
          <el-form-item class="btns">

            <el-button size="small" type="primary" @click="submits('json')">确 定</el-button>
          </el-form-item>

        </el-form>
      </div>
    </el-dialog>

  </div>
</template>

<script>
import Vue from "vue";
import system from "@/components/system";
import "./../../styles/tables.scss";
export default {
  components: {},
  data() {
    return {
      adjiaoqiang: false,
      adshangye: false,
      shangye: false,
      jiaoqiang: false,
      isdelete: false,
      iseditshow: false, //编辑弹框
      ruleForm: {
        dismissalSeason: null
      },
      ruless: {
        dismissalSeason: [
          {
            required: true,
            message: "请输入驳回原因",
            trigger: "blur"
          }
        ]
      },
      Rejectshow: false,
      dialogTableVisible: false,
      ex_dialogTableVisible: false,
      existence: [],
      rovalHtml: "提交审核",
      isshows: false,
      id: null, //当前id
      policylist: [],
      options: [],
      uppoliy: [],
      workoptions: [],
      info: {},
      navnum: 2,
      dialogShow: false,
      //dialog
      isshow: false,
      formLabelWidth: "120px",
      objtypelist: [
        //对象列表
        //					{name:"政策",value:"0"},
        {
          name: "组织",
          value: "1"
        },
        {
          name: "用户",
          value: "2"
        }
      ],
      premiumlist: [
        //保费列表
        {
          name: "按净保费",
          value: 1
        },
        {
          name: "按全保费",
          value: 0
        }
      ],
      Maidlist: [
        //保费列表
        {
          name: "百分比",
          value: 0
        },
        {
          name: "人名币",
          value: 1
        }
      ],
      Pointslist: [
        //扣点
        {
          name: "是",
          value: 1
        },
        {
          name: "否",
          value: 0
        }
      ],
      addobj: [
        //添加对象列表
      ],
      rule: {
        batchName: [
          {
            required: true,
            message: "请输入批次名称",
            trigger: "blur"
          },
          {
            min: 1,
            max: 50,
            message: "长度在 1 到 50个字符",
            trigger: "blur"
          }
        ]
      },
      rules: {
        extendType: [
          {
            required: true,
            message: "请选择对象类型",
            trigger: "change"
          }
        ],
        targetId: [
          {
            required: true,
            message: "请选择对象",
            trigger: "change"
          }
        ],
        premiumType: [
          {
            required: true,
            message: "请选择保费类型",
            trigger: "change"
          }
        ],
        brokerageBusinessType: [
          {
            required: true,
            message: "请选择返佣类型",
            trigger: "change"
          }
        ],
        chargeType: [
          {
            required: true,
            message: "请选择是否扣点",
            trigger: "change"
          }
        ]
      },
      json: {
        policyItemId: "", //政策id
        extendType: "1", //对象类型,
        targetId: [], //对象
        lowerBrokerageTraffic: "0", //交强-佣金
        lowerRewardTraffic: "0", //较强——奖励
        lowerBrokerageBusiness: "0", //商业-佣金
        lowerRewardBusiness: "0", //商业——奖励
        lowerBrokerageVehicleTax: "0" //下游车船税佣金比例
        //	remarks: "" //备注
      },
      userlist: [],
      treeData: [], //树数据
      treeProps: {
        label: "displayName",
        children: "orgs",
        level: "depth",
        value: "id"
      }, //树属性
      copyinfo: {
        staffId: []
      },
      islimit: false,
      policyId: null,
      Jurisdiction: "",
      indexs: null,
      indexs_tow: null,
      additional: {},
      organization: [],
      dds: {
        aa: "1"
      },
      isdelete: false,
      url: process.env.BASE_API + "services/InitExcel"
    };
  },
  filters: {
    isPercentage(val) {
      if (val == 0) {
        return "%";
      } else {
        return "元";
      }
    }
  },
  mounted() {
    // new system()
    var dd = process.env.BASE_API;
    console.log(dd);
    console.log(system);
  },
  methods: {
    //数字小数点
    clearNoNum(obj, max) {
      obj = obj.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
      obj = obj.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
      obj = obj
        .replace(".", "$#$")
        .replace(/\./g, "")
        .replace("$#$", ".");
      obj = obj.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
      if (obj.indexOf(".") < 0 && obj != "") {
        //以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
        obj = parseFloat(obj);
      }
      if (max && obj > max) {
        obj = max;
      }
      if (obj == "") {
        obj = 0;
        // 11
      }
      console.log(obj);
      return obj;
    },
    //编辑时佣金奖励判断
    yongjin(val) {
      console.log(val);
      let obj = this.clearNoNum(val);
      this.additional.upperBrokerageTraffic = obj;
      console.log(val);
    },
    jiangli(val) {
      let obj = this.clearNoNum(val);
      this.additional.upperRewardTraffic = obj;
    },
    yongjin2(val) {
      let obj = this.clearNoNum(val);
      this.additional.upperBrokerageBusiness = obj;
    },
    jiangli2(val) {
      let obj = this.clearNoNum(val);
      this.additional.upperRewardBusiness = obj;
    },
    //取消删除
    deleteCancel(val) {
      this.$refs[val].doClose();
    },
    //删除
    deletPolicy() {
      console.log("3123");
    },
    //添加下游交强佣金奖励
    adjiaoqiang1(event, name) {
      let obj;
      if (this.json.brokerageBusinessType == 0) {
        let max = 100;
        obj = this.clearNoNum(event, max);
      } else {
        obj = this.clearNoNum(event);
      }
      this.json.lowerBrokerageTraffic = obj;
    },
    adjiaoqiang2(event, name) {
      let obj;
      if (this.json.brokerageBusinessType == 0) {
        let max = 100;
        obj = this.clearNoNum(event, max);
      } else {
        obj = this.clearNoNum(event);
      }
      this.json.lowerRewardTraffic = obj;
    },

    //添加下游商业佣金奖励
    adshangye1(event, name) {
      console.log(this.json.brokerageBusinessType);
      let obj;
      if (this.json.brokerageBusinessType == 0) {
        let max = 100;
        obj = this.clearNoNum(event, max);
      } else {
        obj = this.clearNoNum(event);
      }
      this.json.lowerBrokerageBusiness = obj;
    },
    adshangye2(event, name) {
      let obj;
      if (this.json.brokerageBusinessType == 0) {
        let max = 100;
        obj = this.clearNoNum(event, max);
      } else {
        obj = this.clearNoNum(event);
      }
      this.json.lowerRewardBusiness = obj;
    },
    //添加下游确定
    submits(formName) {
      console.log(this.json);
      let lowerBrokerageTraffic = Number(this.json.lowerBrokerageTraffic);
      let lowerRewardTraffic = Number(this.json.lowerRewardTraffic);
      let lowerBrokerageBusiness = Number(this.json.lowerBrokerageBusiness);
      let lowerRewardBusiness = Number(this.json.lowerRewardBusiness);
      this.$refs[formName].validate(valid => {
        if (valid) {
          //0是百分比 1是元
          if (this.json.brokerageBusinessType == 0) {
            if (lowerBrokerageTraffic + lowerRewardTraffic > 100) {
              this.adjiaoqiang = true;
            } else {
              this.adjiaoqiang = false;
            }
            if (lowerBrokerageBusiness + lowerRewardBusiness > 100) {
              this.adshangye = true;
            } else {
              this.adshangye = false;
            }
            if (
              lowerBrokerageTraffic + lowerRewardTraffic <= 100 &&
              lowerBrokerageBusiness + lowerRewardBusiness <= 100
            ) {
            }
          } else {
            //类型是元直接提交
          }
        } else {
        }
      });

      // let arr = [];
      // arr.push(this.json);
      // let params = {
      //   extends: arr
      // };
      // this.post(params, "services/app/policy/PolicyAddExtendInfo").then(rs => {
      //   console.log(rs);
      //   this.$notify({
      //     title: "提交成功",
      //     message: "您已成功创建一条下游政策",
      //     type: "success",
      //     customClass: "el-notification-success"
      //   });
      //   system();
      // });
    },
    //编辑按钮加了一个事件
    gotoEdit(
      chargeType,
      brokerageBusinessType,
      policyId,
      upperBrokerageTraffic,
      upperRewardTraffic,
      upperBrokerageBusiness,
      upperRewardBusiness
    ) {
      console.log("332112d21s1d22d");
      this.additional = Object.assign({}, this.additional, {
        chargeType: chargeType,
        brokerageBusinessType,
        policyId: policyId,
        upperBrokerageTraffic: upperBrokerageTraffic,
        upperRewardTraffic: upperRewardTraffic,
        upperBrokerageBusiness: upperBrokerageBusiness,
        upperRewardBusiness: upperRewardBusiness
      });
    },
    edithide(val) {
      console.log("3333");
      this.$refs[val].doClose();
    },
    getdata(val) {
      console.log(val);
    },
    addlowpolic(policyItemId, brokerageBusinessType) {
      this.isshow = true;
      this.json.policyItemId = policyItemId;
      this.json.lowerBrokerageTraffic = "0";
      this.json.lowerRewardTraffic = "0";
      this.json.lowerBrokerageBusiness = "0";
      this.json.lowerRewardBusiness = "0";
      Vue.set(this.json, "brokerageBusinessType", brokerageBusinessType);
      // this.json = Object.assign({}, this.json, {
      //   chargeType: chargeType,
      //   policyId: policyId,
      //   upperBrokerageTraffic: upperBrokerageTraffic,
      //   upperRewardTraffic: upperRewardTraffic,
      //   upperBrokerageBusiness: upperBrokerageBusiness,
      //   upperRewardBusiness: upperRewardBusiness
      // });
      // Vue.set(this.json, "policyItemId", val.policyId)
      // 	Vue.set(this.json, "lowerBrokerageTraffic", 0)
      // 	Vue.set(this.json, "lowerRewardTraffic", 0)
      // 	Vue.set(this.json, "lowerBrokerageBusiness", 0)
      // 	Vue.set(this.json, "lowerRewardBusiness", 0)
      // 	Vue.set(this.json, "lowerBrokerageVehicleTax", 0)
      let params = {
        id: policyItemId
      };
      this.post(params, "services/app/policy/ChildOrganizations").then(res => {
        console.log(res);
        if (res.success) {
          this.organization = res.result;
        } else {
          this.$notify.error({
            title: "错误",
            message: res.error.message
          });
        }
      });
    },
    editshow(val) {
      console.log(val);
    },
    toDetail(batchId, policyId, status, stream) {
      this.$router.push({
        name: "policyupedit",
        query: {
          batchId: batchId,
          policyId: policyId,
          status: status,
          stream: stream
        }
      });
    },
    isdeletetrue(val) {
      console.log(val);
    },
    //编辑确定
    subpolicy(ref) {
      this.$refs[ref].doClose();
      // let obj = {
      //   policyId: this.additional.policyId,
      //   upperBrokerageBusiness: this.additional.upperBrokerageBusiness,
      //   upperRewardBusiness: this.additional.upperRewardBusiness,
      //   upperBrokerageTraffic: this.additional.upperBrokerageTraffic,
      //   upperRewardTraffic: this.additional.upperRewardTraffic,
      //   upperBrokerageVehicleTax: "",
      //   upperRewardVehicleTax: ""
      // };
      let brokerageBusinessType = this.additional.brokerageBusinessType;
      let upperBrokerageBusiness = Number(
        this.additional.upperBrokerageBusiness
      );
      let upperRewardBusiness = Number(this.additional.upperRewardBusiness);
      let upperBrokerageTraffic = Number(this.additional.upperBrokerageTraffic);
      let upperRewardTraffic = Number(this.additional.upperRewardTraffic);

      let params = {
        policyId: this.additional.policyId,
        upperBrokerageBusiness: this.additional.upperBrokerageBusiness,
        upperRewardBusiness: this.additional.upperRewardBusiness,
        upperBrokerageTraffic: this.additional.upperBrokerageTraffic,
        upperRewardTraffic: this.additional.upperRewardTraffic
      };
      if (brokerageBusinessType == "0") {
        //0是百分比 1是元
        if (upperBrokerageBusiness + upperRewardBusiness > 100) {
          console.log(
            upperBrokerageBusiness + upperRewardBusiness,
            "百分比大于100"
          );
          this.shangye = true;
        } else {
          this.shangye = false;
        }
        if (upperBrokerageTraffic + upperRewardTraffic > 100) {
          this.jiaoqiang = true;
        } else {
          this.jiaoqiang = false;
        }
        if (
          upperBrokerageBusiness + upperRewardBusiness <= 100 &&
          upperBrokerageTraffic + upperRewardTraffic <= 100
        ) {
          console.log("这是ok的");
          // this.post(params, "services/app/policy/UpdateUpperPolicyCustom").then(
          //   rs => {
          //     if (rs.success) {
          //       console.log("success");
          //       console.log(rs);
          //       this.getPolicyList();
          //       this.edithide();
          //     } else {
          //       this.$notify.error({
          //         title: "错误",
          //         message: res.error.message
          //       });
          //     }
          //   }
          // );
          //this.iseditshow = false;
        }
      } else {
        // this.post(params, "services/app/policy/UpdateUpperPolicyCustom").then(
        //   rs => {
        //     if (rs.success) {
        //       console.log("success");
        //       console.log(rs);
        //       this.getPolicyList();
        //       this.edithide();
        //     } else {
        //       this.$notify.error({
        //         title: "错误",
        //         message: res.error.message
        //       });
        //     }
        //   }
        // );
        //this.iseditshow = false;
      }
    },
    isdeletefalse() {},
    //确定删除
    deletepolicy(policyBatchType, policyId, policyItemRatesID) {
      this.isdelete = true;
      let params = {
        policyBatchType: policyBatchType,
        policyId: policyId
      };
      if (policyItemRatesID) {
        params.policyItemRatesID = policyItemRatesID;
      }
      this.post(params, "services/app/policy/DeletePolicy").then(res => {
        console.log(res);
        if (res.success) {
          this.$notify({
            title: "删除成功",
            message: "您已成功删除一条政策",
            type: "success",
            customClass: "el-notification-success"
          });
          this.$refs[ref].doClose();
          system();
        } else {
          this.$notify.error({
            title: "错误",
            message: res.error.message
          });
        }
      });
    }
  }
};
</script>
